package com.product.system.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.product.system.domain.request.ArgpLogisticsDeliver;
import com.product.system.domain.response.ArgpLogistics;
import com.product.system.mapper.ArgpLogisticsMapper;
import com.product.system.service.ArgpLogisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArgpLogisticsServiceImpl implements ArgpLogisticsService {


    @Autowired
    ArgpLogisticsMapper argpLogisticsMapper;

    @Override
    public PageInfo<ArgpLogistics> getLogisticsList(Integer pageNum,Integer pageSize,String trackingNumber) {
        PageHelper.startPage(pageNum,pageSize);
        List<ArgpLogistics> logisticsList = argpLogisticsMapper.getLogisticsList(trackingNumber);
        PageInfo<ArgpLogistics> argpLogisticsPageInfo = new PageInfo<>(logisticsList);

        return argpLogisticsPageInfo;
    }

    @Override
    public boolean sureLogisticsDeliver(ArgpLogisticsDeliver argpLogisticsDeliver) {

      Boolean aaa =   argpLogisticsMapper.sureLogisticsDeliver(argpLogisticsDeliver);
      return aaa;
    }
}
